/**
 * @author chuzhixin 1204505056@qq.com （不想保留author可删除）
 * @description 路由拦截状态管理，目前两种模式：all模式与intelligence模式，其中partialRoutes是菜单暂未使用
 */

import { getTiaoZhuanList } from '@/api/tiaozhuan'


const state = () => ({
  tiaozhuanList:[]
})

const mutations = {
  RECEIVE_TIAOZHUANLIST(state, tiaozhuanList) {
    state.tiaozhuanList = tiaozhuanList
  },

}
const actions = {
  async getTiaozhuanList({ commit }, data) {
  
    //开源版只过滤动态路由permissions，admin不再默认拥有全部权限
    const result = await getTiaoZhuanList(data)
    console.log(1)
    if(result.code ===200){
      commit('RECEIVE_TIAOZHUANLIST',result.data)
      console.log(1)
    }
  
   
  }
}
export default { state,  mutations, actions }
